﻿using System;


namespace Account_Book_Contact_Class
{
    class Contact
    {
        private string personName;
        private string personId;
        private int age;
        private string mobileNumber;
        private char gender;

        public Contact()
        {
            this.personName = "No Name";
            this.personId = "No ID";
            this.age = 0;
            this.mobileNumber = "No Number";
            this.gender = '\0';
        }

        public Contact(string name , string id , int age , string mob , char g)
        {
            this.personName = name;
            this.personId = id;
            this.age = age;
            this.mobileNumber = mob;
            this.gender = g;
        }

        public void ShowPersonInfo()
        {
            Console.WriteLine("Name : " + this.personName + "\nID : " + this.personId + "\nAge : " + this.age + "\nMobile No : " + this.mobileNumber + "\nGender : " + this.gender);
        }

        public string DetectMobileOperator()
        {
            if (this.mobileNumber[2]=='7')
                return "GP";
            if (this.mobileNumber[2]=='6'|| this.mobileNumber[1]=='8') 
                return "Robi";
            return "Blink";
        }




    }
}
